package
{
	import com.bit101.components.Component;
	import com.bit101.components.RadioButton;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLRequest;
	
	import org.zengrong.utils.BitmapTool;
	import org.zengrong.utils.BitmapUtil;
	
	public class Library extends Sprite
	{
		public function Library()
		{
			Component.initStage(stage);
			
			var loader:Loader = new Loader;
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE,handler);
			loader.load(new URLRequest("assert/2.png"))
		}
		private function handler(e:Event):void{
			var bit:Bitmap = e.target.content as Bitmap;
			var arr:Vector.<BitmapData> = BitmapTool.getBitmaps(bit.bitmapData,5,4);
			var bitmap:BitmapData = BitmapTool.transparent(arr[6]);
			addChild(new Bitmap(BitmapUtil.trim(bitmap).bitmapData));
		}
	}
}